package com.hejing.annotation注解.初识注解;

import java.util.Date;

/**
 * ClassName: AnnotationTest
 * Package: com.hejing.annotation注解
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-04-04 8:51
 * @Version: 1.0
 */
public class AnnotationTest {
    public static void main(String[] args) {

        Date date = new Date();

        // @SuppressWarnings 测试
        @SuppressWarnings("unused")int num = 10;

    }
}

@MyAnnotation(value="class")
class Person{
    String name;
    int age;

    @MyAnnotation(value="method")
    public void eat() {
        System.out.println("人吃饭");
    }


}

class Student extends Person{

    @Override
    public void eat() {
        System.out.println("学生吃饭");
    }
}
























